
** Import raw data
infile using "$rawpath\CNLSY79_controlvariables\CNLSY79_controlvariables.dct", clear

** To get labels
run "$rawpath\CNLSY79_controlvariables\CNLSY79_controlvariables-value-labels.do"

tolower

rename c0000100 child_pid
rename c0000200 mom_pid
rename c0005300 race 
rename c0005400 sex

rename c0005500 dob_month 
rename c0005700 dob_year 
rename c0000900 mom_spouse_id
rename c0005800 birth_order
rename c0007000 mother_age_birth
rename c0328600 birthweight

* Recode missing some variables
foreach var in mother_age_birth birth_order dob_month birthweight {
	replace `var'=. if `var'<0 
}

save "$rawpath\000_cnlsy_child_controlvariables_raw.dta", replace
